//File		: FCExportImport3D.cpp
//Purpose	: Declaration class for Export/Import Collada to 3DCoat
//Data		: 18/07/2009
//---------------------------------------------------------------------
#ifndef __FCExportImport3D_H
#define __FCExportImport3D_H

class FCDGeometryMesh;
class FCDGeometryPolygons;
class FCDocument;
template <class T> 
class FCDLibrary;
class FCDGeometry;
class FULogFile;
typedef FCDLibrary<FCDGeometry> FCDGeometryLibrary;
/* Import & Export Collada file*/
namespace comms{
class FCExportImport3D
{
	public:
		FCExportImport3D(const char* file);
		~FCExportImport3D();
		bool DecodeObj(cMeshConatainer& pMesh);
		int EncodeObj(const cMeshConatainer &Mesh);
	protected:
		bool AddPolygons(FCDGeometryPolygons *polygons, 
						 cMeshConatainer& Mesh, 
						 int idCurMtl, 
						 int CurObject); 
		int  FindMaterialIDX(cMeshConatainer& Mesh,const char*material);
		bool FillColladaDocument(const cMeshConatainer &Mesh);
		bool FillMeshContainer(cMeshConatainer &Mesh);
		void ProcessMesh(FCDGeometryMesh* mesh);
		void ProcessGeometryLibrary(FCDGeometryLibrary* library);
	private:
		cStr m_file;
		FCDocument *m_document;
		FULogFile *m_logFile;
};
};
#endif